<h2>List Details</h2>
<?php
    $this->headTitle('List Details');
    $this->headScript()->appendFile('/js/BizSense/Crud.js');   
    $list = $this->list;
    $listId = $this->escape($this->listId);
    $acl = $this->acl;    
?>

<?php 
if ($acl->isAllowed($this->currentUser, 'access newsletter pages')):
echo "<a href=\"" . $this->url(
            array(
                'module' => 'newsletter', 
                'controller' => 'list', 
                'action' => 'index'
            ), NULL, true
        ) . "\">List</a> | ";
endif;

if ($acl->isAllowed($this->currentUser, 'access newsletter pages')):
echo "<a href=\"" . $this->url(
            array(
                'module' => 'newsletter', 
                'controller' => 'list', 
                'action' => 'edit',
                'list_id' => $listId
            ), NULL, true
        ) . "\">Edit</a> | ";
endif;

if  ($acl->isAllowed($this->currentUser, 'access newsletter pages')): 
    $deleteUrl = $this->url(
                    array(
                        'module' => 'newsletter',
                        'controller' => 'list',
                        'action' => 'delete',
                        'list_id' =>$this->escape($listId)
                    )
                );
                echo $this->deleteButton($deleteUrl); 
                echo "| ";
endif;
 
if ($acl->isAllowed($this->currentUser, 'access newsletter pages')):
echo "<a href=\"" . $this->url(
            array(
                'module' => 'newsletter', 
                'controller' => 'list', 
                'action' => 'subscriber',
                'list_id' => $listId
            ), NULL, true
        ) . "\">Subscribers</a> | ";
endif;        

if ($acl->isAllowed($this->currentUser, 'access newsletter pages')):
echo "<a href=\"" . $this->url(
            array(
                'module' => 'newsletter', 
                'controller' => 'list', 
                'action' => 'import',
                'list_id' => $listId
            ), NULL, true
        ) . "\">Import</a> | ";
endif;

?>

<table class="data_table">
    <tr>
        <td>Name </td> 
        <td><?php echo $this->escape($list['name']); ?></td>
    </tr>
    <tr>
        <td>Description </td> 
        <td><?php echo $this->escape($list['description']); ?></td>
    </tr>
    <tr>
        <td>Created </td>
        <td><?php echo $this->escape(
           $this->timestampToDocument($list['created'])); ?> </td>
    </tr>
    <tr>
        <td>Show in customer portal </td> 
        <td><?php echo $this->escape(
                $list['show_in_customer_portal']) == 1? 'Yes' : 'No'; ?></td>
    </tr>
    <tr>
        <td>Automatic bounce handle </td>
        <td><?php echo $this->escape(
                    $list['auto_bounce_handle']) == 1? 'Yes' : 'No';?> </td>
    </tr>
</table>

<p>
    Add a new subscriber
</p>

<div id="form">
    <?php   echo $this->form; ?>
</div>
<div class="div_clear"></div>
